package com.me.bbs.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * <p>
 * 
 * </p>
 *
 * @author lm
 * @since 2023-01-09
 */
@TableName("view_record")
@Data
@ApiModel(value = "ViewRecord对象", description = "")
public class ViewRecord implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("浏览历史记录id")
    @TableId
    private Long recordId;

    @ApiModelProperty("属于的用户")
    private Long user;

    @ApiModelProperty("浏览的文章id")
    private Long post;

    @ApiModelProperty("浏览的时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime viewTime;


    @Override
    public String toString() {
        return "ViewRecord{" +
            "recordId = " + recordId +
            ", user = " + user +
            ", post = " + post +
            ", createTime = " + viewTime +
        "}";
    }
}
